]> git.pld-linux.org Git - packages/gtk+2.git/blob - cups-auth.patch
- added am patch (fixes build with automake 1.13)
[packages/gtk+2.git] / cups-auth.patch
1 diff -ur gtk+-3.2.2/modules/printbackends/cups.orig/gtkcupsutils.c gtk+-3.2.2/modules/printbackends/cups/gtkcupsutils.c
2 --- gtk+-3.2.2/modules/printbackends/cups.orig/gtkcupsutils.c   2011-11-07 19:47:37.000000000 +0100
3 +++ gtk+-3.2.2/modules/printbackends/cups/gtkcupsutils.c        2011-11-23 11:50:56.413671604 +0100
4 @@ -265,6 +265,10 @@
5        else if (request->type == GTK_CUPS_GET)
6          get_states[request->state] (request);
7  
8 +      if (gtk_cups_result_is_error (request->result)) {
9 +          request->state = GTK_CUPS_REQUEST_DONE;
10 +      }
11 +
12        if (request->attempts > _GTK_CUPS_MAX_ATTEMPTS &&
13            request->state != GTK_CUPS_REQUEST_DONE)
14          {
15 @@ -918,8 +922,8 @@
16   * The callback sets cups_password to NULL to signal that the 
17   * password has been used.
18   */
19 -static char *cups_password;
20 -static char *cups_username;
21 +static char *cups_password = NULL;
22 +static char *cups_username = NULL;
23  
24  static const char *
25  passwordCB (const char *prompt)
26 @@ -955,6 +959,7 @@
27  
28        if (request->password_state == GTK_CUPS_PASSWORD_APPLIED)
29          {
30 +          request->poll_state = GTK_CUPS_HTTP_IDLE;
31            request->password_state = GTK_CUPS_PASSWORD_NOT_VALID;
32            request->state = GTK_CUPS_POST_AUTH;
33            request->need_password = TRUE;
34 @@ -972,7 +976,6 @@
35          {
36            if (request->password_state == GTK_CUPS_PASSWORD_NONE)
37              {
38 -              cups_password = g_strdup ("");
39                cups_username = request->username;
40                cupsSetPasswordCB (passwordCB);
41  
42 @@ -984,6 +987,7 @@
43                    /* move to AUTH state to let the backend 
44                     * ask for a password
45                     */ 
46 +                  request->poll_state = GTK_CUPS_HTTP_IDLE;
47                    request->state = GTK_CUPS_POST_AUTH;
48                    request->need_password = TRUE;
49  
50 @@ -1247,6 +1287,7 @@
51  
52        if (request->password_state == GTK_CUPS_PASSWORD_APPLIED)
53          {
54 +          request->poll_state = GTK_CUPS_HTTP_IDLE;
55            request->password_state = GTK_CUPS_PASSWORD_NOT_VALID;
56            request->state = GTK_CUPS_GET_AUTH;
57            request->need_password = TRUE;
58 @@ -1264,7 +1311,6 @@
59          {
60            if (request->password_state == GTK_CUPS_PASSWORD_NONE)
61              {
62 -              cups_password = g_strdup ("");
63                cups_username = request->username;
64                cupsSetPasswordCB (passwordCB);
65  
66 @@ -1284,6 +1331,7 @@
67                    /* move to AUTH state to let the backend
68                     * ask for a password
69                     */
70 +                  request->poll_state = GTK_CUPS_HTTP_IDLE;
71                    request->state = GTK_CUPS_GET_AUTH;
72                    request->need_password = TRUE;
73  
74 @@ -1324,7 +1385,7 @@
75            return;
76          }
77  
78 -      request->state = GTK_CUPS_GET_SEND;
79 +      request->state = GTK_CUPS_GET_CONNECT;
80        request->last_status = HTTP_CONTINUE;
81  
82       return;
This page took 0.07917 seconds and 3 git commands to generate.